import base from '@/api/baseurl';
import request from '@/utils/request'

/**
 * 查询公共参数
 * @param {*} query
 * @returns
 */
export function findMovingverage(query) {
  return request({
    baseURL: base.appBaseApi,
    url: '/movingverage/findMovingverage',
    method: 'get',
    params: query
  })
}

// 获取新增时候的编码
export function getAddtermRateCode() {
  return request({
    baseURL: base.appBaseApi,
    url: '/movingverage/addgs_ma_code',
    method: 'get',
  })
}

/**
 * 查询生成曲线类型和移动平均曲线类型
 * @param {*} query
 * @returns
 */
export function findmadsystype() {
  return request({
    baseURL: base.appBaseApi,
    url: '/movingverage/findmadsystype',
    method: 'get',
  })
}

// 查询移动平均曲线类型
export function findcvtype(query) {
  return request({
    baseURL: base.appBaseApi,
    url: '/movingverage/findcvtype',
    method: 'get',
    params: query
  })
}

//查询移动平均曲线
export function findcvlist(query) {
  return request({
    baseURL: base.appBaseApi,
    url: '/movingverage/findcvlist',
    method: 'get',
    params: query
  })
}

/**
 * 增加参数值
 * @param {*} data
 * @returns
 */

export function addMovingverage(data) {
  return request({
    baseURL: base.appBaseApi,
    url: '/movingverage/addMovingverage',
    method: 'post',
    data
  })
}

//
/**
 * 增加参数值
 * @param {*} data
 * @returns
 */

export function synchronizationGenerate(query) {
  return request({
    baseURL: base.appBaseApi,
    url: '/movingverage/generate',
    method: 'get',
    params: query
  })
}

/**
 * 单条删除
 * @param {*} query
 * @returns
 */
export function deleteMovingverage(query) {
  return request({
    baseURL: base.appBaseApi,
    url: '/movingverage/deleteMovingverage',
    method: 'get',
    params: query
  })
}


/**
 * 修改参数
 * @param {*} data
 * @returns
 */
export function updateMovingverage(data) {
  return request({
    baseURL: base.appBaseApi,
    url: '/movingverage/updateMovingverage',
    method: 'post',
    data
  })
}

// 获取国家编号下拉列表
export function findxiala(query) {
  return request({
    baseURL: base.appBaseApi,
    url: '/movingverage/findxiala',
    method: 'get',
    params: query
  })
}

// 获取国家编号下拉列表
export function findexchange(query) {
  return request({
    baseURL: base.appBaseApi,
    url: '/movingverage/findexchange',
    method: 'get',
    params: query
  })
}
